package com.gewu.pm.ui.adapter.order;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.gewu.pm.R;
import com.gewu.pm.app.AppAdapter;

/**
 * 代支付订单详情
 */
public class PendingPaymentOrderDetailsAdapter extends AppAdapter<String> {

    public PendingPaymentOrderDetailsAdapter(@NonNull Context context) {
        super(context);
    }

    @NonNull
    @Override
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        return new PendingPaymentOrderDetailsViewHolder();
    }

    private final class PendingPaymentOrderDetailsViewHolder extends AppAdapter<String>.ViewHolder {

        private final TextView tvMoney;

        private PendingPaymentOrderDetailsViewHolder() {
            super(R.layout.pending_payment_order_details_item);
            tvMoney = findViewById(R.id.tv_money);
        }

        @Override
        public void onBindView(int position) {
            tvMoney.setText(getItem(position));
        }
    }
}
